export default function ({ route, redirect }) {
  if (route.path !== '/' && route.path.endsWith('/')) {
    redirect(301, route.path.slice(0, -1))
  }
  if (route.path == '/en') {
    redirect(301, '/')
  }
  if (route.path == '/en/igtv-downloader') {
    redirect(301, '/igtv-downloader')
  }
  if (route.path == '/en/instagram-photo-download') {
    redirect(301, '/instagram-photo-download')
  }
  if (route.path == '/en/instagram-reels-video-download') {
    redirect(301, '/instagram-reels-video-download')
  }
  if (route.path == '/en/instagram-story-download') {
    redirect(301, '/instagram-story-download')
  }
}